package com.yupi.springbootinit.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName auto_result
 */
@Data
@TableName("auto_result")
public class AutoResult implements Serializable {
    private Long id;

    @TableField("create_time")
    private Date createTime;
    @TableField("custom_id")
    private String customId;
    @TableField("custom_name")
    private String customName;
    @TableField("db_type")
    private String dbType;
    private String kb;
    @TableField("result_msg")
    private String resultMsg;
    @TableField("bak_file")
    private String bakFile;
    @TableField("svn_path")
    private String svnPath;
    @TableField("qc")
    private Long qc;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AutoResult other = (AutoResult) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getCustomId() == null ? other.getCustomId() == null : this.getCustomId().equals(other.getCustomId()))
                && (this.getCustomName() == null ? other.getCustomName() == null : this.getCustomName().equals(other.getCustomName()))
                && (this.getDbType() == null ? other.getDbType() == null : this.getDbType().equals(other.getDbType()))
                && (this.getKb() == null ? other.getKb() == null : this.getKb().equals(other.getKb()))
                && (this.getResultMsg() == null ? other.getResultMsg() == null : this.getResultMsg().equals(other.getResultMsg()))
                && (this.getBakFile() == null ? other.getBakFile() == null : this.getBakFile().equals(other.getBakFile()))
                && (this.getSvnPath() == null ? other.getSvnPath() == null : this.getSvnPath().equals(other.getSvnPath()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCustomId() == null) ? 0 : getCustomId().hashCode());
        result = prime * result + ((getCustomName() == null) ? 0 : getCustomName().hashCode());
        result = prime * result + ((getDbType() == null) ? 0 : getDbType().hashCode());
        result = prime * result + ((getKb() == null) ? 0 : getKb().hashCode());
        result = prime * result + ((getResultMsg() == null) ? 0 : getResultMsg().hashCode());
        result = prime * result + ((getBakFile() == null) ? 0 : getBakFile().hashCode());
        result = prime * result + ((getSvnPath() == null) ? 0 : getSvnPath().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", createTime=").append(createTime);
        sb.append(", customId=").append(customId);
        sb.append(", customName=").append(customName);
        sb.append(", dbType=").append(dbType);
        sb.append(", kb=").append(kb);
        sb.append(", resultMsg=").append(resultMsg);
        sb.append(", bakFile=").append(bakFile);
        sb.append(", svnPath=").append(svnPath);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}